package com.ziq.zcamp.bean.post

import com.blankj.utilcode.util.GsonUtils
import com.ziq.zcamp.proguard.ProguardKeep
import java.io.Serializable

class User : ProguardKeep, Serializable {
    var uid :Int? = null
    var nick_name :String? = null
    var header_img :String? = null
    var header_url :String? = null

    //露营打卡次数
    var camping_count : Int ?= null

    var ip_locate : String ?= null //ip归属地


    fun parseData(){
        if (header_img?.isNotEmpty() == true){
            header_img?.let {
                val list: List<ImageInfo> = GsonUtils.fromJson(it, GsonUtils.getListType(ImageInfo::class.java))
                header_url = list.getOrNull(0)?.url?:""
            }
        }
    }
}